/*
 * 
 * 
 * 
 */
package com.hboxs.asl.service.impl;

import com.hboxs.asl.Filter;
import com.hboxs.asl.dao.PointTradeDao;
import com.hboxs.asl.entity.Member;
import com.hboxs.asl.entity.PointTrade;
import com.hboxs.asl.service.PointTradeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * Service - 积分记录
 */
@Service("pointTradeServiceImpl")
public class PointTradeServiceImpl extends BaseServiceImpl<PointTrade, Long> implements PointTradeService {

    @Resource(name = "pointTradeDaoImpl")
    private PointTradeDao pointTradeDao;

    @Resource(name = "pointTradeDaoImpl")
    public void setBaseDao(PointTradeDao pointTradeDao) {
        super.setBaseDao(pointTradeDao);
    }


    @Override
    public List<PointTrade> findPointTrade(Member from, Member to) {
        List<Filter> fs = new ArrayList<>();
        fs.add(Filter.eq("member", from));
        fs.add(Filter.eq("memberParent", to));
        return findList(null, null, fs, null);
    }
}
